#include "QtRepairPoint.h"
#include <QPainter>
#include "QtBlendToEffect.h"
#include "QtSequentialAnimationEffect.h"
#include "QtScaleToEffect.h"
#include "QtRotateToEffect.h"

QtRepairPoint::QtRepairPoint(QtSprite *parent): QtCellSprite(parent), duration(1000)
{
	SetResource("background", "cellbackground");
	AddResourceSpecification("background", "repair");
	SetResource("foreground", "repairpoint");
}

QtRepairPoint::~QtRepairPoint()
{
}

void QtRepairPoint::Reached(void)
{
	QtSequentialAnimationEffect seq;

	QtScaleToEffect effect;

	effect.SetDuration(duration);
	effect.SetTarget(this);
	effect.SetEndScale(Width()+20, Height()+20);

	seq.AddEffect(&effect);

	effect.SetEndScale(Width(), Height());

	seq.AddEffect(&effect);

	AddEffect(&seq);

	Start();
}




